<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="王超凡">
    <title></title>
    <style>
        * {
            box-sizing: border-box;
        }
        
        ul {
            padding: 0;
            margin: 0;
            list-style: none;
        }
        
        body {
            height: 1000px;
            margin: 0;
        }
        
        .topmargin {
            line-height: 50px;
            margin-top: -16px;
            width: 100%;
            height: 65px;
            background-color: #10C55B;
            line-height: 80px;
        }
        
        .topmargin a {
            width: 100%;
            height: 50px;
            color: white;
            text-decoration: none;
        }
        
        .topmargin li:hover {
            background-color: #01ac48;
            height: 65px;
        }
        
        .topmargin1 {
            margin-left: 300px;
        }
        
        .topmargin2 {
            margin-left: 1250px;
        }
        
        .topmargin2 span {
            font-size: 12px;
            margin-left: 20px;
        }
        
        .topmargin2 button {
            border-radius: 10%;
            width: 60px;
            height: 30px;
            border: 1px solid #01923D;
            color: white;
            background-color: #01923D;
            margin-left: 20px;
        }
        
        .topmargin li {
            text-align: center;
            width: 100px;
            margin-left: 20px;
            float: left;
            font-size: 17px;
            list-style: none;
        }
        
        .search {
            margin-top: 25px;
            margin-left: 350px;
        }
        
        .search1 {
            float: left;
        }
        
        .search1 span {
            color: #10C55B;
            font-size: 50px;
        }
        
        .search1 p {
            font-size: 13px;
            color: darkgray;
        }
        
        .search2 {
            width: 668px;
            vertical-align: top;
            margin-left: 90px;
            height: 50px;
            line-height: 50px;
            display: inline-block;
            border: 1px solid #ccc;
            border-radius: 4px;
            position: relative;
            padding: 10px 15px;
            background-color: #fff;
        }
        
        .search21 {
            width: 62px;
            position: relative;
            cursor: pointer;
            border-right: 1px solid #ccc;
            font-size: 14px;
            color: #666;
            display: inline-block;
            vertical-align: top;
            line-height: 30px;
        }
        
        .search22 input {
            width: 500px;
            border: 0;
        }
        
        .search22 {
            display: inline-block;
            vertical-align: top;
            line-height: 30px;
            text-align: left;
            margin: 0;
            padding: 0;
        }
        
        .search2 p {
            margin-top: 0;
            background-color: #10C55B;
            width: 80px;
            height: 50px;
            position: absolute;
            top: -1px;
            right: -1px;
            border-radius: 0 4px 4px 0;
        }
        
        .search2 a {
            text-decoration: none;
        }
        
        .search3 {
            margin-left: 240px;
        }
        
        .search3 li {
            margin-left: 10px;
            font-size: 12px;
            float: left;
            list-style: none;
        }
        
        .search3 a {
            text-decoration: none;
        }
        
        .flexslider {
            width: 1200px;
            height: 320px;
            margin: 100px auto;
            position: relative;
        }
        
        .flexslider {
            margin-top: 70px;
        }
        
        .img1 {
            padding: 0;
            margin: 0;
            list-style: none;
        }
        
        .img1 li {
            position: absolute;
            top: 0;
            left: 0;
            display: none;
        }
        
        .img1 li.current {
            display: block;
        }
        
        .img2 {
            bottom: 20px;
            width: 100%;
            position: absolute;
            left: 0;
            display: flex;
            justify-content: center;
            color: white;
        }
        
        .img2 li {
            width: 15px;
            height: 15px;
            background-color: #aaa;
            text-align: center;
            line-height: 20px;
            margin: 0 1px;
            border-radius: 50%;
            cursor: pointer;
            list-style: none;
        }
        
        .img2 li.active {
            background-color: #10C55B;
        }
        
        .img3 span {
            width: 30px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            color: white;
            background-color: rgba(0, 0, 0, 0.1);
            position: absolute;
            top: calc(50% - 20px);
            display: none;
        }
        
        .img3 span:hover {
            background-color: orange;
            cursor: pointer;
        }
        
        .img3 .prev {
            left: 0;
        }
        
        .img3 .next {
            right: 0;
        }
        
        .content {
            margin-top: -70px;
            position: absolute;
        }
        
        .special {
            line-height: 50px;
            width: 1300px;
            height: 50px;
            margin-left: 430px;
        }
        
        .special div {
            float: left;
        }
        
        .special a {
            text-decoration: none;
        }
        
        .special1 {
            font-size: 25px;
            color: gray;
        }
        
        .special2 {
            margin-left: 30px;
        }
        
        .special2 a {
            font-size: 15px;
            color: #888888;
        }
        
        .special3 a {
            color: #888888;
            margin-left: 470px;
        }
        
        .special-img1 {
            margin-left: 353px;
            width: 1300px;
            height: 300px;
        }
        
        .special-img1 li {
            margin-left: 15px;
            float: left;
        }
        
        .playbill {
            margin-top: -70px;
            line-height: 50px;
            width: 1300px;
            height: 50px;
            margin-left: 430px;
        }
        
        .playbill div {
            float: left;
        }
        
        .playbill a {
            text-decoration: none;
        }
        
        .playbill1 {
            font-size: 25px;
            color: gray;
        }
        
        .playbill2 {
            margin-left: 30px;
        }
        
        .playbill2 a {
            margin-left: 25px;
            font-size: 15px;
            color: #888888;
        }
        
        .playbill3 a {
            color: #888888;
            margin-left: 490px;
        }
        
        .playbill-img1 {
            margin-left: 353px;
            width: 1300px;
            height: 300px;
        }
        
        .playbill-img1 li {
            width: 290px;
            height: 420px;
            margin-left: 15px;
            float: left;
        }
        
        .playbill-img1 a {
            font-size: 14px;
            text-decoration: none;
            color: #888888;
        }
        
        .end {
            margin-top: 900px;
            margin-left: 400px;
            width: 1100px;
            height: 318px;
        }
        
        .end1 ul {
            float: left;
        }
        
        .end1-1 a,
        .end1-2 a,
        .end1-3 a,
        .end1-4 a {
            text-decoration: none;
            font-size: 12px;
            color: #888;
        }
        
        .end1-1 li,
        .end1-2 li,
        .end1-3 li,
        .end1-4 li {
            padding-top: 6px;
        }
        
        .end1-5 a {
            text-decoration: none;
            font-size: 20px;
            color: #666;
        }
        
        .end1-1,
        .end1-2,
        .end1-3,
        .end1-4 {
            width: 160px;
            height: 176px;
        }
        
        .end1-5 {
            float: right;
            width: 310px;
            height: 190px;
        }
        
        hr {
            width: 1200px;
            position: absolute;
            margin-top: 200px;
            margin-left: -30px;
        }
        
        .end2 li {
            padding-left: 10px;
            float: left;
        }
        
        .end span {
            color: #666;
            font-size: 12px;
            float: right;
            margin-right: 30px;
        }
        
        .end a {
            font-size: 13px;
            color: #666;
            text-decoration: none;
        }
        
        .end2 {
            position: absolute;
            margin-top: 210px;
            width: 1200px;
        }
        
        .topmargin2 p {
            margin-top: 27px;
            right: 620px;
            position: absolute;
            float: left;
            width: 30px;
            height: 30px;
            margin-left: 20px;
            background-image: url(./img/common.png);
            background-position: -125px -380px;
            background-repeat: no-repeat;
        }
        
        .search2 span {
            margin-top: 12px;
            position: absolute;
            width: 30px;
            height: 30px;
            margin-left: 20px;
            background-image: url(./img/common.png);
            background-position: -60px -440px;
        }
        
        .special1 p {
            margin-top: 8px;
            position: absolute;
            width: 30px;
            height: 30px;
            margin-left: -40px;
            background-image: url(./img/common.png);
            background-position: -97px -410px;
        }
        
        .playbill1 p {
            margin-top: 8px;
            margin-left: -30px;
            position: absolute;
            width: 30px;
            height: 30px;
            background-image: url(./img/common.png);
            background-position: -127px -414px;
        }
        
        .playbill-img1 p {
            margin: 0px;
            position: absolute;
            width: 50px;
            height: 50px;
            background-image: url(./img/common.png);
            background-position: -3px -3px;
        }
    </style>
</head>

<body>
    <div class="topmargin">
        <ul class="topmargin1">
            <li><a href="">首页</a></li>
            <li><a href="">所有分类&#8744;</a></li>
            <li><a href="">设计创意</a></li>
            <li><a href="">办公创意</a></li>
            <li><a href="">· · ·</a></li>
        </ul>
        <ul class="topmargin2">
            <li>
                <a href="">
                    <p></p>VIP中心</a>
            </li>
            <button type="">请登录</button>
            <span>免费注册</span>
        </ul>
    </div>

    <div class="search">
        <div class="search1">
            <span><b>千图网</b></span>
            <p>轻松设计 高效办公</p>
        </div>
        <div class="search2">
            <div class="search21">全站</div>
            <div class="search22"><input type="" name="" placeholder="800万免费设计素材任意下载"></div>
            <p>
                <a href=""><span></span></a>
            </p>
        </div>
        <div class="search3">
            <ul class="search31">
                <li><a href="">热门搜索:</a></li>
                <li><a href="">七夕</a></li>
                <li><a href="">详情页</a></li>
                <li><a href="">icon</a></li>
                <li><a href="">主图</a></li>
                <li><a href="">秋季</a></li>
                <li><a href="">PPT模板</a></li>
                <li><a href="">EXCEL模板</a></li>
                <li><a href="">首页</a></li>
                <li><a href="">个人简历</a></li>
                <li><a href="">装饰画</a></li>
            </ul>

        </div>

    </div>

    <div class="flexslider">
        <ul class="img1">
            <li class="current">
                <a href="#"><img src="./img/banner01.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="./img/banner02.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="./img/banner03.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="./img/banner04.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="./img/banner05.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="./img/banner06.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="./img/banner07.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="./img/banner08.jpg" alt=""></a>
            </li>
        </ul>
        <ul class="img2">
            <li class="active"></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
        <div class="img3">
            <span class="prev">&lt;</span>
            <span class="next">&gt;</span>
        </div>
    </div>

    <div class="content">
        <div class="special">
            <div class="special1"><span><p></p>精选专题</span></div>
            <div class="special2"><a href="">100万党建素材、PPT汇报模板无限下载，每天仅需0.18元立享VIP特权</a></div>
            <div class="special3"><a href="">更多 >></a></div>
        </div>

        <div class="special-img">
            <ul class="special-img1">
                <li>
                    <a href=""><img src="./img/jxzt01.jpg" alt=""></a>
                </li>
                <li>
                    <a href=""><img src="./img/jxzt02.jpg" alt=""></a>
                </li>
                <li>
                    <a href=""><img src="./img/jxzt03.jpg" alt=""></a>
                </li>
                <li>
                    <a href=""><img src="./img/jxzt04.jpg" alt=""></a>
                </li>
            </ul>
        </div>

        <div class="playbill">
            <div class="playbill1"><span><p></p>商用海报</span></div>
            <div class="playbill2">
                <a href="">招聘海报</a>
                <a href="">配图海报</a>
                <a href="">企业文化</a>
                <a href="">促销海报</a>
                <a href="">原创插画</a>
            </div>
            <div class="playbill3"><a href="">更多 >></a></div>
        </div>

        <div class="playbill-img">
            <ul class="playbill-img1">
                <li>
                    <a href="">
                        <p></p><img src="./img/syhb01.jpg" alt="">超清新雪糕夏日凉爽海报</a>
                </li>
                <li>
                    <a href="">
                        <p></p><img src="./img/syhb02.jpg" alt="">文艺夏日时光菠萝蓝色简约海报设计微信配图</a>
                </li>
                <li>
                    <a href="">
                        <p></p><img src="./img/syhb03.jpg" alt="">七夕情人节扁平风创意简约商业海报设计模板</a>
                </li>
                <li>
                    <a href="">
                        <p></p><img src="./img/syhb04.jpg" alt="">我的前半生文艺情感配图海报设计</a>
                </li>
            </ul>
        </div>
    </div>

    <div class="end">
        <div class="end1">
            <ul class="end1-1">
                <li><a href="">常见问题</a></li>
                <li><a href="">成为特邀设计师</a></li>
                <li><a href="">成为原创贡献者</a></li>
                <li><a href="">注册登录</a></li>
                <li><a href="">帐号/密码</a></li>
                <li><a href="">充值/售后</a></li>
                <li><a href="">版权投诉</a></li>
            </ul>
            <ul class="end1-2">
                <li><a href="">关于千图网</a></li>
                <li><a href="">关于我们</a></li>
                <li><a href="">媒体报道</a></li>
                <li><a href="">加入我们</a></li>
                <li><a href="">心系千图</a></li>
                <li><a href="">每日最新</a></li>
            </ul>
            <ul class="end1-3">
                <li><a href="">产品服务</a></li>
                <li><a href="">官方博客</a></li>
                <li><a href="">帮助中心</a></li>
                <li><a href="">千图导航</a></li>
            </ul>
            <ul class="end1-4">
                <li><a href="">友情链接</a></li>
                <li><a href="">我图网</a></li>
                <li><a href="">千库网</a></li>
                <li><a href="">摄图网</a></li>
                <li><a href="">包图网</a></li>
                <li><a href="">视达网</a></li>
                <li><a href="">更多>></a></li>
            </ul>
            <div class="end1-5">
                <p><a href=""><b>客服咨询</b></a></p>
                <p><a href="">400-998-7011(9:00-18:00)</a></p>
                <p><a href="">feedback@pic.com</a></p>
                <p><a href="">点我交谈</a></p>
            </div>
        </div>
        <hr>

        <div class="end2">
            <ul>
                <li>
                    <a href=""></a>
                </li>
                <li>
                    <a href=""></a>
                </li>
                <li><a href="">注册声明</a></li>
                <li><a href="">版权声明</a></li>
                <li><a href="">售后服务</a></li>
                <span>Copyright ©2013-2017 千图网 沪ICP备10011451号-6上海工商 安全实名验证 信用网站</span>
            </ul>
        </div>

    </div>
</body>

</html>
<script>
    window.onload = function () {
        // 第一步 找标签
        var box = document.querySelector('.flexslider');
        var imgLis = document.querySelectorAll('.img1 li');
        var indicatorLis = document.querySelectorAll('.img2 li');
        var prev = document.querySelector('.prev');
        var next = document.querySelector('.next');

        var index = 0;//当前的索引值
        // 上一张
        function prevImg() {
            index = index == 0 ? index = imgLis.length - 1 : index - 1;
            showImg();
        }
        // 下一张
        function nextImg() {
            index = index == imgLis.length - 1 ? 0 : index + 1;
            showImg();
        }
        // 展示图片
        function showImg() {
            for (var i = 0; i < imgLis.length; i++) {
                imgLis[i].className = '';
                indicatorLis[i].className = '';
            }
            console.log(index);
            imgLis[index].className = 'current';
            indicatorLis[index].className = 'active';
        }

        // 1.自动切换图片
        var timer = setInterval(nextImg, 2000);

        // 2.图片跟随指示灯切换
        for (var i = 0; i < indicatorLis.length; i++) {
            indicatorLis[i].index = i;
            indicatorLis[i].onmouseover = function () {
                // 鼠标进来，暂停自动切换
                clearInterval(timer);
                timer = null;
                // 根据鼠标选中的指示灯的索引来切换图片
                // 并记录和更新 index 的值
                index = this.index;
                showImg();
            }
            indicatorLis[i].onmouseout = function () {
                // 鼠标出去，开始自动切换
                if (timer) return;
                timer = setInterval(nextImg, 2000);
            }
        }

        // 3.点击按钮切换
        box.onmouseover = function () {
            clearInterval(timer);
            timer = null;
            prev.style.display = 'block';
            next.style.display = 'block';
        }
        box.onmouseout = function () {
            if (timer) return;
            timer = setInterval(nextImg, 2000);
            prev.style.display = 'none';
            next.style.display = 'none';
        }
        // 点击 上一张
        prev.onclick = function () {
            prevImg();
        }
        // 点击 下一张
        next.onclick = function () {
            nextImg();
        }
    }

</script>